#include "Camera/Camera.h"

#include "Engine/Engine.h"


namespace tyro
{
	namespace Camera
	{
		Camera::Camera(const String& name, Engine::Engine* engine )
			:	sceneGraph(engine->GetSceneGraph())
		{
		}
 
		void Camera::RenderScene( Graphics::IViewport* viewport )
		{
			sceneGraph->RenderScene(this, viewport);
		}

		Math::Matrix4f Camera::GetProjectionMatrix( void ) const
		{

			frustum.Update();

			return frustum.GetProjectionMatrix();
		}

		void Camera::SetAspectRatio( tyro::FLOAT_32 val )
		{
			frustum.SetAspectRatio(val);
		}

	}
}